package com.hjzd.ai.smartpractice.entity.DTO;

import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.List;

/**
 * @author pengyonglei
 * @version 1.0.0
 */
public class ScoreRule {

	private boolean enable;	// 状态：是否开启
	private String name;	// 评分项名称
	private String uniqueKey;	// 评分项唯一标识
	private Integer weight;	// 权重百分比，0-100
	private int minValue;	// 达标最小值
	private int maxValue;	// 达标最大值

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUniqueKey() {
		return uniqueKey;
	}

	public void setUniqueKey(String uniqueKey) {
		this.uniqueKey = uniqueKey;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public int getMinValue() {
		return minValue;
	}

	public void setMinValue(int minValue) {
		this.minValue = minValue;
	}

	public int getMaxValue() {
		return maxValue;
	}

	public void setMaxValue(int maxValue) {
		this.maxValue = maxValue;
	}

	public static void main(String[] args) {
		List<ScoreRule> ruleList = new ArrayList<>();
		// 语速
		ScoreRule voiceSpeed = new ScoreRule();
		voiceSpeed.setEnable(true);
		voiceSpeed.setUniqueKey("speed");
		voiceSpeed.setName("语速检测");
		voiceSpeed.setWeight(10);
		voiceSpeed.setMinValue(100);
		voiceSpeed.setMaxValue(200);
		ruleList.add(voiceSpeed);
		// 情绪识别
		ScoreRule emotionRecognition = new ScoreRule();
		emotionRecognition.setEnable(true);
		emotionRecognition.setUniqueKey("emotion");
		emotionRecognition.setName("情绪识别");
		emotionRecognition.setWeight(10);
		emotionRecognition.setMinValue(0);
		emotionRecognition.setMaxValue(10);
		ruleList.add(emotionRecognition);
		// 超时回复
		ScoreRule timeoutReply = new ScoreRule();
		timeoutReply.setEnable(true);
		timeoutReply.setUniqueKey("timeout");
		timeoutReply.setName("超时回复");
		timeoutReply.setWeight(10);
		timeoutReply.setMinValue(5);
		timeoutReply.setMaxValue(100);
		ruleList.add(timeoutReply);
		// 关键词命中率
		ScoreRule keywordHitRate = new ScoreRule();
		keywordHitRate.setEnable(true);
		keywordHitRate.setUniqueKey("keywords");
		keywordHitRate.setName("关键词命中率");
		keywordHitRate.setWeight(20);
		keywordHitRate.setMinValue(80);
		keywordHitRate.setMaxValue(100);
		ruleList.add(keywordHitRate);
		// 话术流畅度
		ScoreRule dialogFluency = new ScoreRule();
		dialogFluency.setEnable(true);
		dialogFluency.setUniqueKey("fluency");
		dialogFluency.setName("话术流畅度");
		dialogFluency.setWeight(20);
		dialogFluency.setMinValue(80);
		dialogFluency.setMaxValue(100);
		ruleList.add(dialogFluency);
		// 话题相关性
		ScoreRule topicRelatedness = new ScoreRule();
		topicRelatedness.setEnable(true);
		topicRelatedness.setUniqueKey("relevance");
		topicRelatedness.setName("话题相关性");
		topicRelatedness.setWeight(30);
		topicRelatedness.setMinValue(80);
		topicRelatedness.setMaxValue(100);
		ruleList.add(topicRelatedness);
		System.out.println(new Gson().toJson(ruleList));

	}
}
